/**行动次数是否剩余的指示图标 */
class ActionIcon extends eui.Component{
	private _times:number
	private _maskObj:egret.Sprite
	public constructor() {
		super()
		this._times = 1

		this.once(eui.UIEvent.CREATION_COMPLETE, this.onComplete, this)
	}

	protected onComplete(e:any){
		this._maskObj = MaskSprite.create(this)
	}

	public set highlight(v:boolean){
		if(v){
			CardHightLightFilter.instance.addHighLight(this)
		}else{
			CardHightLightFilter.instance.removeHightLight(this)
		}
	}

	public set times(t:number){
		this._times = t
		if(t > 0){
			this.light()
		}else{
			this.dark()
		}
	}

	private light(){
		this.mask = null
	}

	private dark(){
		this.mask = this._maskObj
	}
}